package com.honghe.system.service.impl;

import java.util.List;
import com.honghe.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.honghe.system.mapper.DebtInformationMapper;
import com.honghe.system.domain.DebtInformation;
import com.honghe.system.service.IDebtInformationService;

/**
 * 债权转让Service业务层处理
 * 
 * @author xjw
 * @date 2025-04-22
 */
@Service
public class DebtInformationServiceImpl implements IDebtInformationService 
{
    @Autowired
    private DebtInformationMapper debtInformationMapper;

    /**
     * 查询债权转让
     * 
     * @param id 债权转让主键
     * @return 债权转让
     */
    @Override
    public DebtInformation selectDebtInformationById(Long id)
    {
        return debtInformationMapper.selectDebtInformationById(id);
    }

    /**
     * 查询债权转让列表
     * 
     * @param debtInformation 债权转让
     * @return 债权转让
     */
    @Override
    public List<DebtInformation> selectDebtInformationList(DebtInformation debtInformation)
    {
        return debtInformationMapper.selectDebtInformationList(debtInformation);
    }

    /**
     * 新增债权转让
     * 
     * @param debtInformation 债权转让
     * @return 结果
     */
    @Override
    public int insertDebtInformation(DebtInformation debtInformation)
    {
        debtInformation.setCreateTime(DateUtils.getNowDate());
        return debtInformationMapper.insertDebtInformation(debtInformation);
    }

    /**
     * 修改债权转让
     * 
     * @param debtInformation 债权转让
     * @return 结果
     */
    @Override
    public int updateDebtInformation(DebtInformation debtInformation)
    {
        debtInformation.setUpdateTime(DateUtils.getNowDate());
        return debtInformationMapper.updateDebtInformation(debtInformation);
    }

    /**
     * 批量删除债权转让
     * 
     * @param ids 需要删除的债权转让主键
     * @return 结果
     */
    @Override
    public int deleteDebtInformationByIds(Long[] ids)
    {
        return debtInformationMapper.deleteDebtInformationByIds(ids);
    }

    /**
     * 删除债权转让信息
     * 
     * @param id 债权转让主键
     * @return 结果
     */
    @Override
    public int deleteDebtInformationById(Long id)
    {
        return debtInformationMapper.deleteDebtInformationById(id);
    }
}
